﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KinectTD.Game_Management
{
    public class Player
    {
        private int money;

        /// <summary>
        /// Current player Score
        /// </summary>
        public int Money
        {
            get { return money; }
            set { money = value; }
        }

        private int level;

        /// <summary>
        /// Current level the player is on
        /// </summary>
        public int Level
        {
            get { return level; }
            set { level = value; }
        }

        private float health;

        /// <summary>
        /// Current player health.
        /// </summary>
        public float Health
        {
            get { return health; }
            set { health = value; }
        }

        public Player()
        {
            money = 1000;
            level = 0;
            health = 100.0f;
        }

        public bool BuyTower(int cost)
        {
            if (money >= cost)
            {
                money -= cost;
                return true;
            }
            return false;
        }

        public void Pay(int amount)
        {
            money += amount;
        }

        public bool AffordTower(int cost)
        {
            return (money >= cost);
        }

    }
}
